package com.sgb.kjwl.model.entity.transport;

import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.google.gson.annotations.SerializedName;
import com.swgk.core.base.model.entity.VideoBean;

import java.util.List;

/**
 *承运需求列表实体类
 */
public class CarriageInfo implements MultiItemEntity {

    private String heightHurdle;
    private String destCityName;
    private String distance;
    private String dest_province_no;
    private String freight;
    private String freightUnit;
    private String unit;
    private String weight;
    private String dest_province_name;
    private String carLenName;
    private String destDistrictName;
    private String carNumber;
    private String destCityNo;
    @SerializedName(value = "shipDistrictNo",alternate = {"districtNo"})
    private String shipDistrictNo;
    @SerializedName(value = "shipDistrictName",alternate = {"districtName"})
    private String shipDistrictName;
    @SerializedName(value = "shipProvinceNo",alternate = {"provinceNo"})
    private String shipProvinceNo;
    @SerializedName(value = "shipProvinceName",alternate = {"provinceName"})
    private String shipProvinceName;
    @SerializedName(value = "shipCityNo",alternate = {"cityNo"})
    private String shipCityNo;
    @SerializedName(value = "shipCityName",alternate = {"cityName"})
    private String shipCityName;
    @SerializedName(value = "carrierNo",alternate = {"no"})
    private String carrierNo;
    private Integer isDump;
    private String carrierId;
    private String destDistrictNo;
    @SerializedName(value = "shipmentStartTime",alternate = {"shipmentTime"})
    private long shipmentStartTime;
    private long shipmentEndTime;
    private String carTypeName;
    private String contrctsNumber;
    @SerializedName(value = "latitude",alternate = {"lat"})
    private double latitude;
    @SerializedName(value = "longitude",alternate = {"lng"})
    private double longitude;
    private String telphone;
    private String name;
    private UserVoBean userVo;
    private Long authTime;//车主实名认证信息

    //头像对应的名字
    private String roleName;
    //头像
    private String img;
    //1：企业 / 2：团队 / 3:个人
    private Integer terminal;
    //运费意向 是否商议 1商议 0未勾选
    private Integer discuss;
    //公里数
    private Double kilometre;

    public Long getAuthTime() {
        return authTime;
    }

    public void setAuthTime(Long authTime) {
        this.authTime = authTime;
    }
    private String carrierCreateIm;

    public String getCarrierCreateIm() {
        return carrierCreateIm;
    }

    public void setCarrierCreateIm(String carrierCreateIm) {
        this.carrierCreateIm = carrierCreateIm;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public Integer getTerminal() {
        return terminal;
    }

    public void setTerminal(Integer terminal) {
        this.terminal = terminal;
    }

    public void setDiscuss(Integer discuss) {
        this.discuss = discuss;
    }

    public Double getKilometre() {
        return kilometre;
    }

    public void setKilometre(Double kilometre) {
        this.kilometre = kilometre;
    }

    public Integer getDiscuss() {
        return discuss;
    }

    public void setDiscuss(int discuss) {
        this.discuss = discuss;
    }

    /**
     * 装车开始时间点  2.0.6
     * 25——表示全天
     */
    private int startPointTime;

    /**
     * 装车结束时间点  2.0.6
     * 25——表示全天
     */
    private int endPointTime;

    public int getStartPointTime() {
        return startPointTime;
    }

    public void setStartPointTime(int startPointTime) {
        this.startPointTime = startPointTime;
    }

    public int getEndPointTime() {
        return endPointTime;
    }

    public void setEndPointTime(int endPointTime) {
        this.endPointTime = endPointTime;
    }

    public String getTelphone() {
        return telphone;
    }

    public void setTelphone(String telphone) {
        this.telphone = telphone;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public UserVoBean getUserVo() {
        return userVo;
    }

    public void setUserVo(UserVoBean userVo) {
        this.userVo = userVo;
    }

    private Integer  type;
    private List<VideoBean> videoList;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public List<VideoBean> getVideoList() {
        return videoList;
    }

    public void setVideoList(List<VideoBean> videoList) {
        this.videoList = videoList;
    }

    public String getContrctsNumber() {
        return contrctsNumber;
    }

    public void setContrctsNumber(String contrctsNumber) {
        this.contrctsNumber = contrctsNumber;
    }

    public String getHeightHurdle() {
        return heightHurdle;
    }

    public void setHeightHurdle(String heightHurdle) {
        this.heightHurdle = heightHurdle;
    }

    public String getDestCityName() {
        return destCityName;
    }

    public void setDestCityName(String destCityName) {
        this.destCityName = destCityName;
    }

    public String getDistance() {
        return distance;
    }

    public void setDistance(String distance) {
        this.distance = distance;
    }

    public String getDest_province_no() {
        return dest_province_no;
    }

    public void setDest_province_no(String dest_province_no) {
        this.dest_province_no = dest_province_no;
    }

    public String getFreightUnit() {
        if (freightUnit == null) {
            return "元/吨";
        }
        switch (freightUnit) {
            case "1":
                return "元/趟";
            case "2":
                return "元/吨";
            case "3":
                return "元/方";
        }
        return "元/吨";
    }

    public void setFreightUnit(String freightUnit) {
        this.freightUnit = freightUnit;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getFreight() {
        return freight;
    }

    public void setFreight(String freight) {
        this.freight = freight;
    }

    public String getShipDistrictName() {
        return shipDistrictName;
    }

    public void setShipDistrictName(String shipDistrictName) {
        this.shipDistrictName = shipDistrictName;
    }

    public String getShipProvinceName() {
        return shipProvinceName;
    }

    public void setShipProvinceName(String shipProvinceName) {
        this.shipProvinceName = shipProvinceName;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getDest_province_name() {
        return dest_province_name;
    }

    public void setDest_province_name(String dest_province_name) {
        this.dest_province_name = dest_province_name;
    }

    public String getCarLenName() {
        return carLenName;
    }

    public void setCarLenName(String carLenName) {
        this.carLenName = carLenName;
    }

    public String getDestDistrictName() {
        return destDistrictName;
    }

    public void setDestDistrictName(String destDistrictName) {
        this.destDistrictName = destDistrictName;
    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }

    public String getShipCityName() {
        return shipCityName;
    }

    public void setShipCityName(String shipCityName) {
        this.shipCityName = shipCityName;
    }

    public String getDestCityNo() {
        return destCityNo;
    }

    public void setDestCityNo(String destCityNo) {
        this.destCityNo = destCityNo;
    }

    public String getShipProvinceNo() {
        return shipProvinceNo;
    }

    public void setShipProvinceNo(String shipProvinceNo) {
        this.shipProvinceNo = shipProvinceNo;
    }

    public String getCarrierNo() {
        return carrierNo;
    }

    public void setCarrierNo(String carrierNo) {
        this.carrierNo = carrierNo;
    }

    public long getShipmentEndTime() {
        return shipmentEndTime;
    }

    public void setShipmentEndTime(long shipmentEndTime) {
        this.shipmentEndTime = shipmentEndTime;
    }

    public String getShipDistrictNo() {
        return shipDistrictNo;
    }

    public void setShipDistrictNo(String shipDistrictNo) {
        this.shipDistrictNo = shipDistrictNo;
    }

    public String getShipCityNo() {
        return shipCityNo;
    }

    public void setShipCityNo(String shipCityNo) {
        this.shipCityNo = shipCityNo;
    }

    public Integer getIsDump() {
        return isDump;
    }

    public void setIsDump(Integer isDump) {
        this.isDump = isDump;
    }

    public String getCarrierId() {
        return carrierId;
    }

    public void setCarrierId(String carrierId) {
        this.carrierId = carrierId;
    }

    public String getDestDistrictNo() {
        return destDistrictNo;
    }

    public void setDestDistrictNo(String destDistrictNo) {
        this.destDistrictNo = destDistrictNo;
    }

    public long getShipmentStartTime() {
        return shipmentStartTime;
    }

    public void setShipmentStartTime(long shipmentStartTime) {
        this.shipmentStartTime = shipmentStartTime;
    }

    public String getCarTypeName() {
        return carTypeName;
    }

    public void setCarTypeName(String carTypeName) {
        this.carTypeName = carTypeName;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }
    public static class UserVoBean {
        /**
         * companyName :
         * id : 0
         * identityCard :
         * imAccount :
         * imToken :
         * no :
         * realName :
         * telPhone :
         * type : 0
         * username :
         */

        private String companyName;
        private int id;
        private String identityCard;
        private String imAccount;
        private String imToken;
        private String no;
        private String realName;
        private String telPhone;
        private int type;
        private String username;

        public String getCompanyName() {
            return companyName;
        }

        public void setCompanyName(String companyName) {
            this.companyName = companyName;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getIdentityCard() {
            return identityCard;
        }

        public void setIdentityCard(String identityCard) {
            this.identityCard = identityCard;
        }

        public String getImAccount() {
            return imAccount;
        }

        public void setImAccount(String imAccount) {
            this.imAccount = imAccount;
        }

        public String getImToken() {
            return imToken;
        }

        public void setImToken(String imToken) {
            this.imToken = imToken;
        }

        public String getNo() {
            return no;
        }

        public void setNo(String no) {
            this.no = no;
        }

        public String getRealName() {
            return realName;
        }

        public void setRealName(String realName) {
            this.realName = realName;
        }

        public String getTelPhone() {
            return telPhone;
        }

        public void setTelPhone(String telPhone) {
            this.telPhone = telPhone;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getUsername() {
            return username;
        }

        public void setUsername(String username) {
            this.username = username;
        }
    }
    @Override
    public int getItemType() {
        if(videoList==null||videoList.size()==0){
            return SingleItemConstant.TYPE_ONE;
        }
        return  SingleItemConstant.TYPE_TWO;
    }
}
